import { defineStore } from 'pinia'

export const useActionSearchStore = defineStore('actionSearch', {
    state: () => ({
        // 控制搜索区域的显示与隐藏
        isSearchVisible: true,
        searchForm: {
            name: '',
            type: '',
            status: '',
            dateRange: []
        },
        actionType: [
            { value: '1', label: '社教活动' },
            { value: '2', label: '研学活动' },
            { value: '3', label: '国博讲堂' },
        ],
        actionStatus: [
            { value: '0', label: '即将开始' },
            { value: '1', label: '进行中' },
            { value: '2', label: '已结束' },
        ],
    }),
    actions: {
        // 切换搜索区域的显示状态
        toggleSearchArea() {
            this.isSearchVisible = !this.isSearchVisible;
        },
    },
    getters: {

    },
}
)